package com.dfy.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dfy.dto.OrderListRequest;
import com.dfy.dto.OrderResponse;
import com.dfy.dto.OrderRequest;
import com.dfy.dto.TripDTO;
import com.dfy.entity.Order;
import java.time.LocalDateTime;
import java.util.List;

public interface OrderService extends IService<Order> {
    Order createOrder(Long spotId, Long userId, OrderRequest request);
    OrderResponse getOrder(Long orderId);
    void cancelOrder(Long orderId, Long userId);
    List<OrderResponse> getUserOrders(Long userId, OrderListRequest request);
    List<TripDTO> getUserTrips(Long userId, LocalDateTime startTime, LocalDateTime endTime);
    List<OrderResponse> getAllOrders(OrderListRequest request);
    void confirmOrder(Long orderId);
    void adminCancelOrder(Long orderId, String reason);
    Page<OrderResponse> getOrderPage(OrderListRequest request);
    /**
     * 获取用户订单列表
     * @param userId 用户ID
     * @param status 订单状态
     * @param current 当前页
     * @param size 每页大小
     * @return 订单分页数据
     */
    Page<OrderDTO> getMyOrders(Long userId, String status, Integer current, Integer size);
} 